package com.duoduo.admin.controller;

import java.util.List;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.duoduo.admin.api.dto.ConsoleInfoDTO;
import com.duoduo.admin.service.SysDashboardService;
import com.duoduo.admin.service.SysUserService;
import com.duoduo.common.core.util.R;

import cn.hutool.core.lang.tree.Tree;
import lombok.RequiredArgsConstructor;

/**
 * @author duoduo
 * @date 2023/3/30
 *
 * 控制台接口
 */
@RestController
@RequestMapping("/dashboard")
@RequiredArgsConstructor
@ConditionalOnProperty(name = "register.user", matchIfMissing = true)
public class SysDashboardController {

	private final SysDashboardService  sysDashboardService;
	/**
	 * 返回树形菜单集合
	 * @return 树形菜单
	 */
	@GetMapping(value = "console")
	public R<ConsoleInfoDTO> console() {
		return R.ok(sysDashboardService.console());
	}

}
